package model.shader;

import java.awt.Color;
import java.util.Collection;

import raytracing.RayTracer;

import model.lights.Light;
import model.primitive.IntersectionData;
// para mantener la compatibilidad con el ray caster
public class ConstantShader implements Shader {
	public String name;
	public Color color;
	
	public ConstantShader(String name, Color color) {
		this.name = name;
		this.color = color;
	}
	

	public Color getColor(Collection<Light> lights, IntersectionData state,
			RayTracer rt) {
		return color;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public double getRefractionConstant() {
		return 0;
	}


	@Override
	public double getReflectionConstant() {
		return 0;
	}
	
	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("Shader\n");
		sb.append("type: constant").append("\n");
		sb.append("name: " + name).append("\n");
		sb.append("color: " + color).append("\n");
		return sb.toString();
	}
}
